

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>test-suite Guide &#8212; LLVM 9 documentation</title>
    <link rel="stylesheet" href="_static/llvm-theme.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script src="_static/jquery.js"></script>
    <script src="_static/underscore.js"></script>
    <script src="_static/doctools.js"></script>
    <script src="_static/language_data.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="test-suite Makefile Guide (deprecated)" href="TestSuiteMakefileGuide.html" />
    <link rel="prev" title="LLVM Testing Infrastructure Guide" href="TestingGuide.html" />
<style type="text/css">
  table.right { float: right; margin-left: 20px; }
  table.right td { border: 1px solid #ccc; }
</style>

  </head><body>
<div class="logo">
  <a href="index.html">
    <img src="_static/logo.png"
         alt="LLVM Logo" width="250" height="88"/></a>
</div>

    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="TestSuiteMakefileGuide.html" title="test-suite Makefile Guide (deprecated)"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="TestingGuide.html" title="LLVM Testing Infrastructure Guide"
             accesskey="P">previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="index.html">Documentation</a>&raquo;</li>

          <li class="nav-item nav-item-1"><a href="TestingGuide.html" accesskey="U">LLVM Testing Infrastructure Guide</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">test-suite Guide</a></li> 
      </ul>
    </div>


    <div class="document">
      <div class="documentwrapper">
          <div class="body" role="main">
            
  <div class="section" id="test-suite-guide">
<h1>test-suite Guide<a class="headerlink" href="#test-suite-guide" title="Permalink to this headline">¶</a></h1>
<div class="section" id="quickstart">
<h2>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this headline">¶</a></h2>
<ol class="arabic">
<li><p>The lit test runner is required to run the tests. You can either use one
from an LLVM build:</p>
<p><code class="docutils literal notranslate"><span class="pre">`bash</span>
<span class="pre">%</span> <span class="pre">&lt;path</span> <span class="pre">to</span> <span class="pre">llvm</span> <span class="pre">build&gt;/bin/llvm-lit</span> <span class="pre">--version</span>
<span class="pre">lit</span> <span class="pre">0.8.0dev</span>
<span class="pre">`</span></code></p>
<p>An alternative is installing it as a python package in a python virtual
environment:</p>
<p><code class="docutils literal notranslate"><span class="pre">`bash</span>
<span class="pre">%</span> <span class="pre">mkdir</span> <span class="pre">venv</span>
<span class="pre">%</span> <span class="pre">virtualenv</span> <span class="pre">venv</span>
<span class="pre">%</span> <span class="pre">.</span> <span class="pre">venv/bin/activate</span>
<span class="pre">%</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">svn+http://llvm.org/svn/llvm-project/llvm/trunk/utils/lit</span>
<span class="pre">%</span> <span class="pre">lit</span> <span class="pre">--version</span>
<span class="pre">lit</span> <span class="pre">0.8.0dev</span>
<span class="pre">`</span></code></p>
</li>
<li><p>Check out the <cite>test-suite</cite> module with:</p>
<p><code class="docutils literal notranslate"><span class="pre">`bash</span>
<span class="pre">%</span> <span class="pre">git</span> <span class="pre">clone</span> <span class="pre">https://github.com/llvm/llvm-test-suite.git</span> <span class="pre">test-suite</span>
<span class="pre">`</span></code></p>
</li>
<li><p>Create a build directory and use CMake to configure the suite. Use the
<cite>CMAKE_C_COMPILER</cite> option to specify the compiler to test. Use a cache file
to choose a typical build configuration:</p>
<p><a href="#id1"><span class="problematic" id="id2">``</span></a><a href="#id3"><span class="problematic" id="id4">`</span></a>bash
% mkdir test-suite-build
% cd test-suite-build
% cmake -DCMAKE_C_COMPILER=&lt;path to llvm build&gt;/bin/clang </p>
<blockquote>
<div><p>-C../test-suite/cmake/caches/O3.cmake ../test-suite</p>
</div></blockquote>
<p><a href="#id5"><span class="problematic" id="id6">``</span></a><a href="#id7"><span class="problematic" id="id8">`</span></a></p>
</li>
<li><p>Build the benchmarks:</p>
<p><code class="docutils literal notranslate"><span class="pre">`text</span>
<span class="pre">%</span> <span class="pre">make</span>
<span class="pre">Scanning</span> <span class="pre">dependencies</span> <span class="pre">of</span> <span class="pre">target</span> <span class="pre">timeit-target</span>
<span class="pre">[</span>&#160; <span class="pre">0%]</span> <span class="pre">Building</span> <span class="pre">C</span> <span class="pre">object</span> <span class="pre">tools/CMakeFiles/timeit-target.dir/timeit.c.o</span>
<span class="pre">[</span>&#160; <span class="pre">0%]</span> <span class="pre">Linking</span> <span class="pre">C</span> <span class="pre">executable</span> <span class="pre">timeit-target</span>
<span class="pre">...</span>
<span class="pre">`</span></code></p>
</li>
<li><p>Run the tests with lit:</p>
<p><code class="docutils literal notranslate"><span class="pre">`text</span>
<span class="pre">%</span> <span class="pre">llvm-lit</span> <span class="pre">-v</span> <span class="pre">-j</span> <span class="pre">1</span> <span class="pre">-o</span> <span class="pre">results.json</span> <span class="pre">.</span>
<span class="pre">--</span> <span class="pre">Testing:</span> <span class="pre">474</span> <span class="pre">tests,</span> <span class="pre">1</span> <span class="pre">threads</span> <span class="pre">--</span>
<span class="pre">PASS:</span> <span class="pre">test-suite</span> <span class="pre">::</span> <span class="pre">MultiSource/Applications/ALAC/decode/alacconvert-decode.test</span> <span class="pre">(1</span> <span class="pre">of</span> <span class="pre">474)</span>
<span class="pre">**********</span> <span class="pre">TEST</span> <span class="pre">'test-suite</span> <span class="pre">::</span> <span class="pre">MultiSource/Applications/ALAC/decode/alacconvert-decode.test'</span> <span class="pre">RESULTS</span> <span class="pre">**********</span>
<span class="pre">compile_time:</span> <span class="pre">0.2192</span>
<span class="pre">exec_time:</span> <span class="pre">0.0462</span>
<span class="pre">hash:</span> <span class="pre">&quot;59620e187c6ac38b36382685ccd2b63b&quot;</span>
<span class="pre">size:</span> <span class="pre">83348</span>
<span class="pre">**********</span>
<span class="pre">PASS:</span> <span class="pre">test-suite</span> <span class="pre">::</span> <span class="pre">MultiSource/Applications/ALAC/encode/alacconvert-encode.test</span> <span class="pre">(2</span> <span class="pre">of</span> <span class="pre">474)</span>
<span class="pre">...</span>
<span class="pre">`</span></code></p>
</li>
<li><p>Show and compare result files (optional):</p>
<p><code class="docutils literal notranslate"><span class="pre">`bash</span>
<span class="pre">#</span> <span class="pre">Make</span> <span class="pre">sure</span> <span class="pre">pandas</span> <span class="pre">is</span> <span class="pre">installed.</span> <span class="pre">Prepend</span> <span class="pre">`sudo`</span> <span class="pre">if</span> <span class="pre">necessary.</span>
<span class="pre">%</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">pandas</span>
<span class="pre">#</span> <span class="pre">Show</span> <span class="pre">a</span> <span class="pre">single</span> <span class="pre">result</span> <span class="pre">file:</span>
<span class="pre">%</span> <span class="pre">test-suite/utils/compare.py</span> <span class="pre">results.json</span>
<span class="pre">#</span> <span class="pre">Compare</span> <span class="pre">two</span> <span class="pre">result</span> <span class="pre">files:</span>
<span class="pre">%</span> <span class="pre">test-suite/utils/compare.py</span> <span class="pre">results_a.json</span> <span class="pre">results_b.json</span>
<span class="pre">`</span></code></p>
</li>
</ol>
</div>
<div class="section" id="structure">
<h2>Structure<a class="headerlink" href="#structure" title="Permalink to this headline">¶</a></h2>
<p>The test-suite contains benchmark and test programs.  The programs come with
reference outputs so that their correctness can be checked.  The suite comes
with tools to collect metrics such as benchmark runtime, compilation time and
code size.</p>
<p>The test-suite is divided into several directories:</p>
<ul>
<li><p><cite>SingleSource/</cite></p>
<p>Contains test programs that are only a single source file in size.  A
subdirectory may contain several programs.</p>
</li>
<li><p><cite>MultiSource/</cite></p>
<p>Contains subdirectories which entire programs with multiple source files.
Large benchmarks and whole applications go here.</p>
</li>
<li><p><cite>MicroBenchmarks/</cite></p>
<p>Programs using the [google-benchmark](<a class="reference external" href="https://github.com/google/benchmark">https://github.com/google/benchmark</a>)
library. The programs define functions that are run multiple times until the
measurement results are statistically significant.</p>
</li>
<li><p><cite>External/</cite></p>
<p>Contains descriptions and test data for code that cannot be directly
distributed with the test-suite. The most prominent members of this
directory are the SPEC CPU benchmark suites.
See [External Suites](#external-suites).</p>
</li>
<li><p><cite>Bitcode/</cite></p>
<p>These tests are mostly written in LLVM bitcode.</p>
</li>
<li><p><cite>CTMark/</cite></p>
<p>Contains symbolic links to other benchmarks forming a representative sample
for compilation performance measurements.</p>
</li>
</ul>
<p>### Benchmarks</p>
<p>Every program can work as a correctness test. Some programs are unsuitable for
performance measurements. Setting the <cite>TEST_SUITE_BENCHMARKING_ONLY</cite> CMake
option to <cite>ON</cite> will disable them.</p>
</div>
<div class="section" id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
<p>The test-suite has configuration options to customize building and running the
benchmarks. CMake can print a list of them:</p>
<p><code class="docutils literal notranslate"><span class="pre">`bash</span>
<span class="pre">%</span> <span class="pre">cd</span> <span class="pre">test-suite-build</span>
<span class="pre">#</span> <span class="pre">Print</span> <span class="pre">basic</span> <span class="pre">options:</span>
<span class="pre">%</span> <span class="pre">cmake</span> <span class="pre">-LH</span>
<span class="pre">#</span> <span class="pre">Print</span> <span class="pre">all</span> <span class="pre">options:</span>
<span class="pre">%</span> <span class="pre">cmake</span> <span class="pre">-LAH</span>
<span class="pre">`</span></code></p>
<p>### Common Configuration Options</p>
<ul>
<li><p><cite>CMAKE_C_FLAGS</cite></p>
<p>Specify extra flags to be passed to C compiler invocations.  The flags are
also passed to the C++ compiler and linker invocations.  See
[<a class="reference external" href="https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html">https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html</a>)</p>
</li>
<li><p><cite>CMAKE_C_COMPILER</cite></p>
<p>Select the C compiler executable to be used. Note that the C++ compiler is
inferred automatically i.e. when specifying <cite>path/to/clang</cite> CMake will
automatically use <cite>path/to/clang++</cite> as the C++ compiler.  See
[<a class="reference external" href="https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html">https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER.html</a>)</p>
</li>
<li><p><cite>CMAKE_BUILD_TYPE</cite></p>
<p>Select a build type like <cite>OPTIMIZE</cite> or <cite>DEBUG</cite> selecting a set of predefined
compiler flags. These flags are applied regardless of the <cite>CMAKE_C_FLAGS</cite>
option and may be changed by modifying <cite>CMAKE_C_FLAGS_OPTIMIZE</cite> etc.  See
[<a class="reference external" href="https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html]](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html">https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html]](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html</a>)</p>
</li>
<li><p><cite>TEST_SUITE_RUN_UNDER</cite></p>
<p>Prefix test invocations with the given tool. This is typically used to run
cross-compiled tests within a simulator tool.</p>
</li>
<li><p><cite>TEST_SUITE_BENCHMARKING_ONLY</cite></p>
<p>Disable tests that are unsuitable for performance measurements. The disabled
tests either run for a very short time or are dominated by I/O performance
making them unsuitable as compiler performance tests.</p>
</li>
<li><p><cite>TEST_SUITE_SUBDIRS</cite></p>
<p>Semicolon-separated list of directories to include. This can be used to only
build parts of the test-suite or to include external suites.  This option
does not work reliably with deeper subdirectories as it skips intermediate
<cite>CMakeLists.txt</cite> files which may be required.</p>
</li>
<li><p><cite>TEST_SUITE_COLLECT_STATS</cite></p>
<p>Collect internal LLVM statistics. Appends <cite>-save-stats=obj</cite> when invocing the
compiler and makes the lit runner collect and merge the statistic files.</p>
</li>
<li><p><cite>TEST_SUITE_RUN_BENCHMARKS</cite></p>
<p>If this is set to <cite>OFF</cite> then lit will not actually run the tests but just
collect build statistics like compile time and code size.</p>
</li>
<li><p><cite>TEST_SUITE_USE_PERF</cite></p>
<p>Use the <cite>perf</cite> tool for time measurement instead of the <cite>timeit</cite> tool that
comes with the test-suite.  The <cite>perf</cite> is usually available on linux systems.</p>
</li>
<li><p><cite>TEST_SUITE_SPEC2000_ROOT</cite>, <cite>TEST_SUITE_SPEC2006_ROOT</cite>, <cite>TEST_SUITE_SPEC2017_ROOT</cite>, …</p>
<p>Specify installation directories of external benchmark suites. You can find
more information about expected versions or usage in the README files in the
<cite>External</cite> directory (such as <cite>External/SPEC/README</cite>)</p>
</li>
</ul>
<p>### Common CMake Flags</p>
<ul>
<li><p><cite>-GNinja</cite></p>
<p>Generate build files for the ninja build tool.</p>
</li>
<li><p><cite>-Ctest-suite/cmake/caches/&lt;cachefile.cmake&gt;</cite></p>
<p>Use a CMake cache.  The test-suite comes with several CMake caches which
predefine common or tricky build configurations.</p>
</li>
</ul>
</div>
<div class="section" id="displaying-and-analyzing-results">
<h2>Displaying and Analyzing Results<a class="headerlink" href="#displaying-and-analyzing-results" title="Permalink to this headline">¶</a></h2>
<p>The <cite>compare.py</cite> script displays and compares result files.  A result file is
produced when invoking lit with the <cite>-o filename.json</cite> flag.</p>
<p>Example usage:</p>
<ul>
<li><p>Basic Usage:</p>
<p><a href="#id9"><span class="problematic" id="id10">``</span></a><a href="#id11"><span class="problematic" id="id12">`</span></a>text
% test-suite/utils/compare.py baseline.json
Warning: ‘test-suite :: External/SPEC/CINT2006/403.gcc/403.gcc.test’ has No metrics!
Tests: 508
Metric: exec_time</p>
<p>Program                                         baseline</p>
<p>INT2006/456.hmmer/456.hmmer                   1222.90
INT2006/464.h264ref/464.h264ref               928.70
…</p>
<blockquote>
<div><p>baseline</p>
</div></blockquote>
<p>count  506.000000
mean   20.563098
std    111.423325
min    0.003400
25%    0.011200
50%    0.339450
75%    4.067200
max    1222.896800
<a href="#id13"><span class="problematic" id="id14">``</span></a><a href="#id15"><span class="problematic" id="id16">`</span></a></p>
</li>
<li><p>Show compile_time or text segment size metrics:</p>
<p><code class="docutils literal notranslate"><span class="pre">`bash</span>
<span class="pre">%</span> <span class="pre">test-suite/utils/compare.py</span> <span class="pre">-m</span> <span class="pre">compile_time</span> <span class="pre">baseline.json</span>
<span class="pre">%</span> <span class="pre">test-suite/utils/compare.py</span> <span class="pre">-m</span> <span class="pre">size.__text</span> <span class="pre">baseline.json</span>
<span class="pre">`</span></code></p>
</li>
<li><p>Compare two result files and filter short running tests:</p>
<p><a href="#id17"><span class="problematic" id="id18">``</span></a><a href="#id19"><span class="problematic" id="id20">`</span></a>bash
% test-suite/utils/compare.py –filter-short baseline.json experiment.json
…
Program                                         baseline  experiment  diff</p>
<p>SingleSour…/Benchmarks/Linpack/linpack-pc     5.16      4.30        -16.5%
MultiSourc…erolling-dbl/LoopRerolling-dbl     7.01      7.86         12.2%
SingleSour…UnitTests/Vectorizer/gcc-loops     3.89      3.54        -9.0%
…
<a href="#id21"><span class="problematic" id="id22">``</span></a><a href="#id23"><span class="problematic" id="id24">`</span></a></p>
</li>
<li><p>Merge multiple baseline and experiment result files by taking the minimum
runtime each:</p>
<p><code class="docutils literal notranslate"><span class="pre">`bash</span>
<span class="pre">%</span> <span class="pre">test-suite/utils/compare.py</span> <span class="pre">base0.json</span> <span class="pre">base1.json</span> <span class="pre">base2.json</span> <span class="pre">vs</span> <span class="pre">exp0.json</span> <span class="pre">exp1.json</span> <span class="pre">exp2.json</span>
<span class="pre">`</span></code></p>
</li>
</ul>
<p>### Continuous Tracking with LNT</p>
<p>LNT is a set of client and server tools for continuously monitoring
performance. You can find more information at
[<a class="reference external" href="http://llvm.org/docs/lnt](http://llvm.org/docs/lnt">http://llvm.org/docs/lnt](http://llvm.org/docs/lnt</a>). The official LNT instance
of the LLVM project is hosted at [<a class="reference external" href="http://lnt.llvm.org](http://lnt.llvm.org">http://lnt.llvm.org](http://lnt.llvm.org</a>).</p>
</div>
<div class="section" id="external-suites">
<h2>External Suites<a class="headerlink" href="#external-suites" title="Permalink to this headline">¶</a></h2>
<p>External suites such as SPEC can be enabled by either</p>
<ul class="simple">
<li><p>placing (or linking) them into the <cite>test-suite/test-suite-externals/xxx</cite> directory (example: <cite>test-suite/test-suite-externals/speccpu2000</cite>)</p></li>
<li><p>using a configuration option such as <cite>-D TEST_SUITE_SPEC2000_ROOT=path/to/speccpu2000</cite></p></li>
</ul>
<p>You can find further information in the respective README files such as
<cite>test-suite/External/SPEC/README</cite>.</p>
<p>For the SPEC benchmarks you can switch between the <cite>test</cite>, <cite>train</cite> and
<cite>ref</cite> input datasets via the <cite>TEST_SUITE_RUN_TYPE</cite> configuration option.
The <cite>train</cite> dataset is used by default.</p>
</div>
<div class="section" id="custom-suites">
<h2>Custom Suites<a class="headerlink" href="#custom-suites" title="Permalink to this headline">¶</a></h2>
<p>You can build custom suites using the test-suite infrastructure. A custom suite
has a <cite>CMakeLists.txt</cite> file at the top directory. The <cite>CMakeLists.txt</cite> will be
picked up automatically if placed into a subdirectory of the test-suite or when
setting the <cite>TEST_SUITE_SUBDIRS</cite> variable:</p>
<p><code class="docutils literal notranslate"><span class="pre">`bash</span>
<span class="pre">%</span> <span class="pre">cmake</span> <span class="pre">-DTEST_SUITE_SUBDIRS=path/to/my/benchmark-suite</span> <span class="pre">../test-suite</span>
<span class="pre">`</span></code></p>
</div>
<div class="section" id="profile-guided-optimization">
<h2>Profile Guided Optimization<a class="headerlink" href="#profile-guided-optimization" title="Permalink to this headline">¶</a></h2>
<p>Profile guided optimization requires to compile and run twice. First the
benchmark should be compiled with profile generation instrumentation enabled
and setup for training data. The lit runner will merge the profile files
using <cite>llvm-profdata</cite> so they can be used by the second compilation run.</p>
<p>Example:
<a href="#id25"><span class="problematic" id="id26">``</span></a><a href="#id27"><span class="problematic" id="id28">`</span></a>bash
# Profile generation run:
% cmake -DTEST_SUITE_PROFILE_GENERATE=ON </p>
<blockquote>
<div><p>-DTEST_SUITE_RUN_TYPE=train ../test-suite</p>
</div></blockquote>
<p>% make
% llvm-lit .
# Use the profile data for compilation and actual benchmark run:
% cmake -DTEST_SUITE_PROFILE_GENERATE=OFF </p>
<blockquote>
<div><p>-DTEST_SUITE_PROFILE_USE=ON -DTEST_SUITE_RUN_TYPE=ref .</p>
</div></blockquote>
<p>% make
% llvm-lit -o result.json .
<a href="#id29"><span class="problematic" id="id30">``</span></a><a href="#id31"><span class="problematic" id="id32">`</span></a></p>
<p>The <cite>TEST_SUITE_RUN_TYPE</cite> setting only affects the SPEC benchmark suites.</p>
</div>
<div class="section" id="cross-compilation-and-external-devices">
<h2>Cross Compilation and External Devices<a class="headerlink" href="#cross-compilation-and-external-devices" title="Permalink to this headline">¶</a></h2>
<p>### Compilation</p>
<p>CMake allows to cross compile to a different target via toolchain files. More
information can be found here:</p>
<ul class="simple">
<li><p>[<a class="reference external" href="http://llvm.org/docs/lnt/tests.html#cross-compiling](http://llvm.org/docs/lnt/tests">http://llvm.org/docs/lnt/tests.html#cross-compiling](http://llvm.org/docs/lnt/tests</a>.html#cross-compiling)</p></li>
<li><p>[<a class="reference external" href="https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html">https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html</a>)</p></li>
</ul>
<p>Cross compilation from macOS to iOS is possible with the
<cite>test-suite/cmake/caches/target-target-*-iphoneos-internal.cmake</cite> CMake cache
files; this requires an internal iOS SDK.</p>
<p>### Running</p>
<p>There are two ways to run the tests in a cross compilation setting:</p>
<ul>
<li><p>Via SSH connection to an external device: The <cite>TEST_SUITE_REMOTE_HOST</cite> option
should be set to the SSH hostname.  The executables and data files need to be
transferred to the device after compilation.  This is typically done via the
<cite>rsync</cite> make target.  After this, the lit runner can be used on the host
machine. It will prefix the benchmark and verification command lines with an
<cite>ssh</cite> command.</p>
<p>Example:</p>
<p><a href="#id33"><span class="problematic" id="id34">``</span></a><a href="#id35"><span class="problematic" id="id36">`</span></a>bash
% cmake -G Ninja -D CMAKE_C_COMPILER=path/to/clang </p>
<blockquote>
<div><p>-C ../test-suite/cmake/caches/target-arm64-iphoneos-internal.cmake -D TEST_SUITE_REMOTE_HOST=mydevice ../test-suite</p>
</div></blockquote>
<p>% ninja
% ninja rsync
% llvm-lit -j1 -o result.json .
<a href="#id37"><span class="problematic" id="id38">``</span></a><a href="#id39"><span class="problematic" id="id40">`</span></a></p>
</li>
<li><p>You can specify a simulator for the target machine with the
<cite>TEST_SUITE_RUN_UNDER</cite> setting. The lit runner will prefix all benchmark
invocations with it.</p></li>
</ul>
</div>
<div class="section" id="running-the-test-suite-via-lnt">
<h2>Running the test-suite via LNT<a class="headerlink" href="#running-the-test-suite-via-lnt" title="Permalink to this headline">¶</a></h2>
<p>The LNT tool can run the test-suite. Use this when submitting test results to
an LNT instance.  See
[<a class="reference external" href="http://llvm.org/docs/lnt/tests.html#llvm-cmake-test-suite](http://llvm.org/docs/lnt/tests">http://llvm.org/docs/lnt/tests.html#llvm-cmake-test-suite](http://llvm.org/docs/lnt/tests</a>.html#llvm-cmake-test-suite)
for details.</p>
</div>
<div class="section" id="running-the-test-suite-via-makefiles-deprecated">
<h2>Running the test-suite via Makefiles (deprecated)<a class="headerlink" href="#running-the-test-suite-via-makefiles-deprecated" title="Permalink to this headline">¶</a></h2>
<p><strong>Note</strong>: The test-suite comes with a set of Makefiles that are considered
deprecated.  They do not support newer testing modes like <cite>Bitcode</cite> or
<cite>Microbenchmarks</cite> and are harder to use.</p>
<p>Old documentation is available in the
[test-suite Makefile Guide](TestSuiteMakefileGuide).</p>
</div>
</div>


            <div class="clearer"></div>
          </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="TestSuiteMakefileGuide.html" title="test-suite Makefile Guide (deprecated)"
             >next</a> |</li>
        <li class="right" >
          <a href="TestingGuide.html" title="LLVM Testing Infrastructure Guide"
             >previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="index.html">Documentation</a>&raquo;</li>

          <li class="nav-item nav-item-1"><a href="TestingGuide.html" >LLVM Testing Infrastructure Guide</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">test-suite Guide</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2003-2020, LLVM Project.
      Last updated on 2020-09-20.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
    </div>
  </body>
</html>